package hos.okgo.converter;

import java.io.IOException;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;

import hos.okhttp.utils.OkHttpResponseUtils;
import okhttp3.Response;

/**
 * <p>Title: OkgoListMapConverter </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2023/4/9 22:43
 */
public class OkGoListMapConverter extends OkGoResponseJsonDataConverter<List<Map<String, Object>>> {
    public OkGoListMapConverter() {
    }

    public OkGoListMapConverter(String data) {
        super(data);
    }

    public OkGoListMapConverter(String success, String code, String message) {
        super(success, code, message);
    }

    public OkGoListMapConverter(String success, String code) {
        super(success, code);
    }

    public OkGoListMapConverter(String success, String code, String data, String message) {
        super(success, code, data, message);
    }

    public OkGoListMapConverter(Type type, String success, String code, String message, String data) {
        super(type, success, code, message, data);
    }

    public OkGoListMapConverter(Type type, String success, String code, String data) {
        super(type, success, code, data);
    }

    public OkGoListMapConverter(Type type, String data) {
        super(type, data);
    }

    public OkGoListMapConverter(Type type) {
        super(type);
    }

    @Override
    public List<Map<String, Object>> parseBody(Type succeed, Response response, String json) throws IOException {
        return OkHttpResponseUtils.convertListMap(response, json);
    }
}
